import { jsonp } from "vue-jsonp";
import { mapKey } from "/@/config/index.js";

// 根据经纬度查详细地址
export const latLingPOIMap = (data) => {
  return jsonp(`https://apis.map.qq.com/ws/geocoder/v1/`, {
    output: "jsonp",
    key: mapKey,
    get_poi: 1,
    ...data,
  });
};
// 根据关键字查详细地址
export const AddressPOIMap = (data) => {
  return jsonp(`https://apis.map.qq.com/ws/geocoder/v1/`, {
    output: "jsonp",
    key: mapKey,
    get_poi: 1,
    ...data,
  });
};

// 边界线
export const getchildrenMap = (id) => {
  return jsonp(`https://apis.map.qq.com/ws/district/v1/getchildren`, {
    output: "jsonp",
    key: mapKey,
    get_polygon: 2,
    id: "371700",
  });
};
